import { createApp } from "vue";
//引入elementui
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import App from "@/App.vue";
import router from "./router/index";
//引入Pinia
import { createPinia } from "pinia";
// 引入全局样式
import "./style.css";
// 引入阿里字体图标库
import "@/assets/inconfont/iconfont.js";
import "@/assets/inconfont/iconfont.css";
import "@/assets/styles/iconfont.css";

//路由钩子
import "./utils/routerHook"
// 引入element的icon图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
//引入Pinia持久存储的创建
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"

let pinia = createPinia()
//使用持久化存储
pinia.use(piniaPluginPersistedstate)
const app = createApp(App);

app.use(router);

app.use(ElementPlus);

app.use(pinia);
// 全局注册el图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
  }


app.mount("#app");

